Added parameters to __addBindings.jq__
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
.
|
.
|
||||||
| debug("Filtering...")
|
| debug("Filtering...")
|
||||||
| .tags[]
|
| .tags[]
|
||||||
|= select(.typeId == "Cooling/PLC_AB/PLC_AB_Auto_v3")
|
|= select(.typeId == $typeId)
|
||||||
# Sort first
|
# Sort first
|
||||||
| debug("Sorting...")
|
| debug("Sorting...")
|
||||||
| walk( if type == "object" and has("tags") then .tags |= sort_by(.name) end )
|
| walk( if type == "object" and has("tags") then .tags |= sort_by(.name) end )
|
||||||
# so object positions are predictable
|
# so object positions are predictable
|
||||||
| 2 as $pos
|
# | 2 as $pos
|
||||||
| .tags[0].tags[$pos].tags as $baseData
|
| .tags[0].tags[$pos].tags as $baseData
|
||||||
| debug("Modifying tags...")
|
| debug("Modifying tags...")
|
||||||
| .tags
|
| .tags
|
||||||
|
|||||||
Reference in New Issue
Block a user