Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORDS Filter for Nested JSON attribute

User_ZET30Oct 4 2021 — edited Oct 4 2021

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?

Comments

Alanc-Oracle
"rdkafka.c", line 4837: undefined symbol: DT_REG
"rdkafka.c", line 4837: improper member use: d_type
"rdkafka.c", line 4837: undefined symbol: DT_LNK
"rdkafka.c", line 4838: improper member use: d_type
"rdkafka.c", line 4838: undefined symbol: DT_DIR

Those errors indicate this code is written to use Linux extensions to the POSIX API's which are not available on Solaris, specifically the d_type field in struct dirent.
You'll have to adapt the code to make it build on Solaris - some examples from other open source projects:
https://grok.cz.oracle.com/source/xref/userland-default/components/pcsc-lite/patches/02-configfile.c.patch
https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
https://mail.python.org/pipermail/python-checkins/2015-March/134835.html
https://git.gnome.org/browse/glib/commit?id=8863071b9d17fa37036549b8c6579736d259a9cd
https://gitlab.freedesktop.org/mesa/mesa/commit/066850edadfe2aa0d339a0c6211ef0a61755a415

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 1 2021
Added on Oct 4 2021
1 comment
283 views