How do I select the first element in a multi-element array?

Status
Not open for further replies.

greychain

Gold Partner
Advanced Certified
Joined
Jul 13, 2018
Messages
779
Reaction score
122
Attached is an example of data returned from a phone number lookup.

How would I select the first entry [0].

What would the rule group be for this also what is the purpose of a rule group?

1646118558566.png
 
<Rule Type="Any">customerList.customerId</Rule>

It should detect the array and match with this. That's how it knows it has results.

Then, set the path for your variable to the same kind. 3CX should take care of grabbing the array element.
 
I can get some results using customerList.customer.customerId as the rule but am unable to access a value that's path is customerList.customer.addresses.phoneNumber2 even though I can create a variable and output from the results.


1646197213437.png
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,473
Latest member
NathanMitchell