Recently, I came across this JSON data:
{"index_name":"grafana1","begin":"1970-01-01T00:00:00.000Z","end":"1970-01-01T00:00:00.000Z","calculated_at":"2022-06-01T00:00:04.099Z","took_ms":0},{"index_name":"grafana2","begin":"1970-01-01T00:00:00.000Z","end":"1970-01-01T00:00:00.000Z","calculated_at":"2022-06-02T00:00:05.099Z","took_ms":0}
I have a website that uses vanilla JavaScript and I want to only showcase the values of "index_name" and "calculated_at" from this JSON string.
To achieve this, I am seeking a method to iterate through the entire string and display only the values associated with these two keys in each entry.
The final output on my website should resemble the following format:
grafana1
2022-06-01T00:00:04.099Z
grafana2
2022-06-02T00:00:05.099Z