I have a graph which returns a few props along with array of Json obj
I want to return only specific name value pairs from attributes which can be accepted as input rather than the entire list of attributes
query ExampleQuery($fulfillerId: String!, $decorationTechnology: String!) {
fulfillmentItemsFromFI(fulfillerId: $fulfillerId, decorationTechnology: $decorationTechnology) {
associatedItems {
itemDetails {
attributes {
name
value
}
}
}
}
}
"data": {
"fulfillmentItemsFromFI": [
{
"itemDetails": {
"attributes": [
{
"name": "config",
"value": "some_Congif_value"
},
{
"name": "orderId",
"value": "BNKTES372"
},
{
"name": "url",
"value": "https://api.tested.com"
},
}
}
Expected output JSON where I only want configData in attributes for all responses
"data": {
"fulfillmentItemsFromFI": [
{
"itemDetails": {
"id" : 1
"attributes": [
{
"name": "configData",
"value": "some_Congif_value"
}
},
"id" : 2
"attributes": [
{
"name": "configData",
"value": "some_Congif_value_2"
}
}