I am new to JSON data manipulation and I would like some help.
I have a JSON file that looks like the below:
[
{
"plannification": {
"Data": 1,
"DataType": "GB",
"InclusionOption1": ".",
"Default": false,
"PropositionId": "GBT13456",
"EssentialLink": "greatpdf.com/pdf.pdf",
"Term": "1",
"Segment": "part",
"Id": "653284",
}
},
{
"plannification": {
"Data": 1,
"DataType": "FR",
"inclusionOption1": ".",
"default": false,
"PropositionId": "FRT13456",
"EssentialLink": "greatpdf.com/pdf2.pdf",
"term": "1",
"Segment": "pro",
"Id": "984532",
}
}
]
I'd like to to convert this file to object and only pull data from "Segment": “pro”,
as below:
{
984532:{
Segment: "pro",
EssentialLink: "greatpdf.com/pdf.pdf",
PropositionId: "FRT13456",
},
etc.. {},
}
Where do I start?