Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • In general it is a bad idea to use content in descriptive places. The structure of a generic document should not change with the content. It was much better to add an array of measure objects, each carrying the date and value in such called items. Commented Mar 6, 2020 at 8:28
  • 1
    Btw: Thank you very much for the good question including a minimal reproducible example and your own attempt. This helps a lot when answering, +1 from my side. Commented Mar 6, 2020 at 8:29
  • Thanks @Shnugo. The expected output is same as what I have put. Only thing is, it should be dynamic, instead of being hardcoded. one more thing, the JSON format is coming from another team and difficult to change. Unless very much needed, we should go with existing JSON format Commented Mar 6, 2020 at 10:02