I am trying to achieve something that seemed very simple, but in recent days you make me angry.
I have a simple array: ["a","b","c","d","e"]and I want to turn it into nested JSON as follows:
{"a":{"b":{"c":{"d":{"e":""}}}}}
Going through it, I ran into problems such as "how to save the last key, to install it after that, without deleting it," etc.
Does anyone have any ideas?
source
share