Closed mindplay-dk closed 5 months ago
I don't think Object
knows it's outputting a collection. Technically, in JavaScript an Array is an Object. We use named data types in Rivet (meaning, there is a string representation for that type). As a result, the Text node is just reading that string which says it's an Object type. The output is probably just a side effect of that object being a collection.
This might be easily fixed by having the Object node inspect the data for being an Array and outputting the appropriate type string.
Fyi, I'm just guessing here.
This might be easily fixed by having the Object node inspect the data for being an Array and outputting the appropriate type string.
You can't inspect the data until there's data though...?
It's actually because we end up with a type
{
"type": "object",
"value": "foo",
}
So it's JSON.stringifying the value. I think if we more intelligently format object values this will be improved.
What happened?
I believe I've managed to isolate a fundamental data type issue with JSON values - have a look at this:
as you can see, from top to bottom:
now contrast that example with this one:
as you can see, from top top bottom:
It looks like this might be a symptom of "leaky" underlying JSON wrapper data types?
Here is the example project for reference: JSON-strings.zip
What was the expected functionality?
Strings and arrays should behave the same everywhere.
Describe your environment
Win 11 Pro
Relevant log output
No response
Relevant screenshots
No response
Code of Conduct