I have a json like so:
json = { \"key1\" : \"watevr1\", \"key2\" : \"watevr2\", \"key3\" : \"watevr3\" }
Now, I want to know the index of a key
In principle, it is wrong to look for an index of a key. Keys of a hash map are unordered, you should never expect specific order.