I was sending a data in json format like { a!tojson("fruit": "apple") } but the output i was getting { "fruit": ["apple"] }but i need without square brackets . Could anyone please help me on this and thanks for advance
Discussion posts and replies are publicly visible
To extract this value from JSON, first you need to parse the JSON using a!fromJson() to convert it into a dictionary. After that you can access the specific key to retrieve the value.
a!fromJson()
i need it inside the a!tojson function
I didn't get your point. From what I understood, you had a JSON input and you wanted to extract a value from it. Then why would you use a!toJson() ?
I was sending a data in json format like { a!tojson("fruit": "apple")} but the output i was getting "fruit": ["apple"] but i need without square brackets