I need to build a json object at runtime. For now, just a simple {"key": "stringvalue"} object. But each key/val pair must be added in a loop.
This seems really simple/basic, but I didn't find any good examples or docs on it. I did finally manage to make something work, but it seems too convoluted to be the right way.
Can anyone post a working example?