Forum Stats

  • 3,769,358 Users
  • 2,252,956 Discussions
  • 7,874,999 Comments

Discussions

ORDS Filter for Nested JSON attribute

User_ZET30
User_ZET30 Member Posts: 1 Employee

Hi, following is the output from my ORDS GET call

{

"items": [

{

"datacenter": "x",

"event_date": "2021-10-04T11:36:07Z",

"mailid": "2",

"data": {

"a": "B"

}

},

{

"datacenter": "y",

"event_date": "2021-10-04T11:36:07Z",

"mailid": "2",

"data": {

"a": "C"

}

},

{

"datacenter": "y",

"event_date": "2021-10-04T11:36:07Z",

"mailid": "2",

"data": {

"b": "C"

}

}

],

"hasMore": false,

"limit": 25,

"offset": 0,

"count": 3,

"links": [

{

"rel": "self",

"href": "http://localhost:8080/ords/idcs_data/idcs_data/a?q=%7B%22%24.data.a%22:%7B%22%24eq%22:%22A%22%7D%7D"

},

{

"rel": "edit",

"href": "http://localhost:8080/ords/idcs_data/idcs_data/a?q=%7B%22%24.data.a%22:%7B%22%24eq%22:%22A%22%7D%7D"

},

{

"rel": "describedby",

"href": "http://localhost:8080/ords/idcs_data/metadata-catalog/idcs_data/item"

},

{

"rel": "first",

"href": "http://localhost:8080/ords/idcs_data/idcs_data/a?q=%7B%22%24.data.a%22:%7B%22%24eq%22:%22A%22%7D%7D"

}

]

}


I want to get only those records where the $.data.a matches "A".

I used following query param to fetch data, but is returning all records.

q={"$.data.a":{"$eq":"A"}}


Can someone please help?

Tagged:

Answers

This discussion has been closed.