hapipal / confidence

Dynamic, declarative configurations
Other
264 stars 44 forks source link

Null values when filtering array items #96

Closed danielb2 closed 3 years ago

danielb2 commented 4 years ago

To reproduce:

  1. add to test.json
    {
    "plugins": [
    {
      "$filter": "env",
      "local": "here"
    },
    {
      "$filter": "env",
      "stage": "stage"
    }
    ]
    }
  2. confidence -c test.json --filter.env=stage

Expected result:

{
    "plugins": [
        "stage"
    ]
}

Actual result:

{
    "plugins": [
        null,
        "stage"
    ]
}

Note that running confidence -c test.json --filter.env=local works as expected, producing:

{
    "plugins": [
        "here"
    ]
}

with no null value for the second entry

devinivy commented 3 years ago

Resolved by #113.