Added parameters to __addBindings.jq__

This commit is contained in:
Javier Quinones
2026-08-25 17:30:30 -05:00
parent 24f5e143dd
commit c5d6c645c4

View File

@@ -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