thedevsaddam / gojsonq

A simple Go package for querying over JSON, YAML, XML, and CSV data.
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.19k stars 140 forks source link

Is it possible to parse multiple json together? #89

Open smartaquarius10 opened 2 years ago

smartaquarius10 commented 2 years ago

Team,

I have tried parsing this json

{
  "module": {
    "ABCD": {
      "source": "",
      "version": "",
      "location": "",
      "resource_group_name": ""
    }
  },
  "module": {
    "PQRS": {
      "source": "",
      "version": "",
      "sa_name": "",
      "resource_group": ""
    }
  }
}

But I'm always getting the details of the last node i.e. PQRS. Is there anyway to get the details of both the nodes considering parent node as modules. The output required is

{
 "ABCD": {
      "source": "",
      "version": "",
      "location": "",
      "resource_group_name": ""
    },
"PQRS": {
      "source": "",
      "version": "",
      "sa_name": "",
      "resource_group": ""
    }
}