-
Given this KDL document
What does KQL
Same question for The result should be the same for For At least for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
(note, we're working on new syntax, and Ok so. KQL, with regular (non-map) syntax, only returns nodes. That is, The map operator, by the way, is going away with 2.0, but if you're implementing the 1.0 operator and want something like it, then yes, This is part of the reason I want to remove the map operator in 2.0: I really want people to be clear that what you're selecting is always nodes, not their properties or values. Think |
Beta Was this translation helpful? Give feedback.
(note, we're working on new syntax, and
>>
is how we refer to descendants now.++
is the same but for siblings)Ok so.
KQL, with regular (non-map) syntax, only returns nodes. That is,
package >> name
andpackage > name
will return thename "bar"
node itself. Ditto for ANY selectors that selectname
.The map operator, by the way, is going away with 2.0, but if you're implementing the 1.0 operator and want something like it, then yes,
=> prop(name)
and=> name
are the same thing.This is part of the reason I want to remove the map operator in 2.0: I really want people to be clear that what you're selecting is always nodes, not their properties or values. Think
document.querySelector()
.