Skip to content

null value check not iterating correctly in arrays #80

Description

@dreaganluna

In any version >5.0.0, the question mark that is used for null values does not iterate correctly in arrays.
By that I mean that this will only work for the first item in an array.

Mapping example:

const mapping = {
	"source[].some": "destination[].some",
	"source[].empty": "destination[].empty?"
};

Result in 5.0.0 or less:

{
	"destination": [
		{
			"some": "value",
			"empty": null
		},
		{
			"some": "value",
			"empty": null
		},
		{
			"some": "value",
			"empty": null
		}
	]
}

Result in >5.0.0:

{
	"destination": [
		{
			"some": "value",
			"empty": null
		},
		{
			"some": "value"
		},
		{
			"some": "value"
		}
	]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions