This can let me insert a key/value pair to a json, but how do I insert the "k0": 0
before the "k1": 1
?
I would like the result to be:
{
"k0": 0,
"k1": 1
}
Thank you!
CodePudding user response:
One option is creating an object with only k0-0 pair and adding the input to it like so:
{k0: 0} .