Based on what you provided i’m assuming you have a list of strings and you want to turn it into a JSON object.
This can be accomplished by using the $map function to add an auto-numbered key to every object and then using the $merge function to turn this list of JSON objects into a single JSON object.