Dot in the property avoid to evaluate value

Status
Not open for further replies.

ado2000

SOHO User
Joined
May 18, 2023
Messages
9
Reaction score
2
Hi, I'm integrating our CRM with 3cx, our json contact have this format.

{
"items": [
{
"id": 4533277,
"properties": {
"AmContact.name": "Name",
"AmContact.surname": "Last name",
"AmContact.telephone": "3452345",
}
}
],
"resultCode": 0
}

when I try to get the id value by using values.id it gets correctly the value.

but if I try to get the name in this way values.properties.AmContact.name I get non value

i also tried values.properties.[AmContact.name], values.properties.['AmContact.name']

what's the correct syntax

Thanks
 
Last edited:
Hmm, the fact that your properties have dots will probably screw all of that up.

Normally, you'd use "items.id" as rule, then "items.properties.AmContact.name". Array syntax won't work for sure.
 
Hi ConceptWeb, thanks for the reply,

to have a dot in the property name is not so common but can happen, the question is: is it possible to escape the dot in property name or not?

how 3cx evaluate the json ? for instance jsonPath can manage this syntax

Screenshot 2023-05-18 alle 14.14.30.png
 
The property path in 3CX isn't the property path you're showing here. They use their own parser.

@edossantos should be able to tell you how to access those properties, if even doable in 3CX directly.
 
  • Like
Reactions: ado2000
No, you will not be able to escape the dots, that JSON response will not work unfortunately.
 
  • Like
Reactions: Evolute IT
Thanks Ernesto,

solved doing a custom api for 3cx.
 
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,887
Members
165,470
Latest member
Robert Lee