-
Notifications
You must be signed in to change notification settings - Fork 7
Update map fields #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update map fields #304
Conversation
apl/data-types/map-fields.mdx
Outdated
- `where ['map_field'].property1.property2 == 14` | ||
- `where ['map_field']['property1']['property2'] == 14` | ||
|
||
If an entity name has spaces (` `), dots (`.`), or dashes (`-`), you can only use index notation for that entity. You can use dot notation for the other entities. For example: | ||
|
||
- `where ['map.field']['property.name1']['property.name2'] == 14` | ||
- `where ['map.field'].property1.property2 == 14` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this was already merged in a previous pr. but as far as i can tell all of these apl examples will not return the desired events.
the only correct syntax is ['map.field']['something.inside.of.it']
see: https://app.dev.axiomtestlabs.co/axiomers-ft83/query?qid=4O0s3Ki3fPa-sxyen5
aside: imo even if there is some other way that works, we should only teach ['map.field']['something.inside.of.it']
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c-ehrlich Thanks for this. I don't know if this recently got broken because the original PR underwent a thorough review process: #65
I've tried to implement your suggestions here: 61e9181
The problem is that where ['map.field']['property.name1']['property.name2'] == 14
still doesn't work but then I don't know how else to deal with property names with special characters like dots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c-ehrlich I have updated this section based on Michal's comment: https://axiom-mano-fix-map-fields.mintlify.app/apl/data-types/map-fields#access-properties-of-nested-maps
Please let me know if this is OK. All the variations work on https://app.dev.axiomtestlabs.co/axiomers-ft83/query?qid=pDnbJ4Db6nO-sy5dyh&relative=1
No description provided.