Hi,
I am trying to get whole output bundle from any module. Basically I need to get JSON of whole output bundle whenever there are data.
For example, module gives me this JSON ouput:
[
{
"id": 1,
"isoCode": "AF",
"boostId": "Country01",
"remotes": [],
"name": "Afghanistan",
"subdivisions": [
{
"id": 1,
"countryId": 1,
"isoCode": "AF-BDS",
"name": "Badakhshān",
"type": "province",
"boostId": "Subdivision01",
"remotes": []
},
{
"id": 2,
"countryId": 1,
"isoCode": "AF-BGL",
"name": "Baghlan",
"type": "province",
"boostId": "Subdivision02",
"remotes": []
}
}
]
And I can see it lake this:
But I dont want to map values of those fields anywhere, I need to extract whole JSON like this in the example a send it somewhere else.
First solution what was on my mind was to agregate it to the array and then transform to JSON. It is working but from whole bundles is 1 array, understandably. I need one JSON for every bundle.
And also some of the tools does not showing fields whenever they are empty. I’m not 100% sure, but I think I’ve seen it somewhere.
Does someone deal with such a situation? Is it doable to export whole JSON for ouput bundle?
Thank you!!