cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using accounts.search with deep structure in data object

david-avvale
Explorer
0 Kudos
269

Hi all!

I need some advice about searching accounts using accounts.search REST API inside a 'deep' data object structure from account schema.

Having these accounts I need to retrieve only accounts with 'eventId' = event1 and status = 3 at the same time. Then, I would like to retrieve only account "UID": "C" as result, but I am retrieving all the accounts.

{
"UID": "A",
"data": {
"events": [
{
"status": "5",
"eventId": "event1",
},
{
"status": "3",
"eventId": "event2",
}]}},
{
"UID": "B",
"data": {
"events": [
{
"status": "2",
"eventId": "event1",
}]}},
{
"UID": "C",
"data": {
"events": [
{
"status": "3",
"eventId": "event1",
}]}}

This is the query param used in account.search API call:

SELECT UID FROM accounts where data.events.status="3" and data.events.eventId="event1"

Thanks!!

Accepted Solutions (0)

Answers (0)