ComfyUI Node

JSON OutputList

Creates an OutputList by extracting arrays or dictionaries from JSON objects. Uses JSONPath syntax to extract the values, see [JSONPath on Wikipedia](https://en.wikipedia.org/wiki/JSONPath) . All matched values are flatten into one long list. You can also use this node to create objects from literal strings like `[1, 2, 3]`. `key`, `value`, `int` and `float` use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes.

By geroldmeisinger·Created 9 months ago·Updated 6 months ago· 169
JSON OutputList
  • obj
  • key
  • value
  • int
  • float
  • count
  • debug
jsonpath$.dict
json{ "dict": { "a": 0.12, "b": 3.45, "c": 6.78 }, "arr": [ 0.12, 3.45, 6.78 ] }
CategoryUtility

Inputs (3)

NameTypeDefaultDescription
jsonpathSTRING$.dictJSONPath used to extract the values.
jsonSTRING{ "dict": { "a": 0.12, "b": 3.45, "c": 6.78 }, "arr": [ 0.12, 3.45, 6.78 ] }A JSON string which is translated to an object.
objopt*(optional) object of any type which will replace the JSON string

Outputs (6)

NameTypeDescription
keySTRINGThe key for dictionaries or index for arrays (as string). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes. Technically it's a global index of the flattened list for all non-keys.
valueSTRINGThe value as a string. use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes.
intINTThe value as a int (if it cannot parse the number, defaults to 0). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes.
floatFLOATThe value as a float (if it cannot parse the number, defaults to 0). use(s) `is_output_list=True` (indicated by the symbol `𝌠`) and will be processed sequentially by corresponding nodes.
countINTTotal number of items in the flattened list
debugSTRINGDebug output of all matched objects as a formatted JSON string