Files
StateMachineParser/tests/inarray.data.json
Anthony FullerandReece Dunham 2b24a2500f feat: Add handling of arrays of objects (#30)
* Add handling of arrays of objects

* feat: throw an error if invalid input is provided

---------

Co-authored-by: Reece Dunham <[email protected]>
2024-07-25 13:08:42 -04:00

156 lines
3.3 KiB
JSON

{
"Inarray1": [
{
"$inarray": {
"in": "$Value.Objs",
"?": {
"$eq": ["$.#", "quiet"]
}
}
},
{
"Value": {
"Objs": ["the", "world", "is", "quiet", "here"]
}
}
],
"Inarray2": [
{
"$inarray": {
"in": "$Value.Objs",
"?": {
"$eq": ["$.#", "clarinet"]
}
}
},
{
"Value": {
"Objs": [
"flute",
"saxophone",
"trumpet",
"bass guitar",
"drums"
]
}
}
],
"Any1": [
{
"$any": {
"in": "$Value.Objs",
"?": {
"$eq": ["$.#", "quiet"]
}
}
},
{
"Value": {
"Objs": ["the", "world", "is", "quiet", "here"]
}
}
],
"Any2": [
{
"$any": {
"in": "$Value.Objs",
"?": {
"$eq": ["$.#", "clarinet"]
}
}
},
{
"Value": {
"Objs": [
"flute",
"saxophone",
"trumpet",
"bass guitar",
"drums"
]
}
}
],
"Any3": [
{
"$any": {
"in": "$Value.listvar",
"?": {
"$eq": [
"$.#.prop",
6
]
}
}
},
{
"Value": {
"listvar": [
{
"prop": 4
},
{
"prop": 6
}
]
}
}
],
"Any4": [
{
"$any": {
"in": "$Value.listvar",
"?": {
"$eq": [
"$.#.prop",
5
]
}
}
},
{
"Value": {
"listvar": [
{
"prop": 4
},
{
"prop": 6
}
]
}
}
],
"Invalid_Crash_Nested": [
{
"$any": {
"in": "$.MyList",
"?": {
"$any": {
"in": "$.#",
"?": {
"$eq": ["$.##.prop", 4]
}
}
}
}
},
{
"Value": {
"MyList": [
[
{
"prop": 4
}
],
[
{
"prop": 6
}
]
]
}
}
]
}