Closed thejhh closed 10 years ago
Looks like arrays are ignored if they are named as property messages:
messages
> require('json-diff-patch').diff({ messages: [] }, { messages: [ { subject: 'Hello', body: 'This is a test message.' } ] }); [] > require('json-diff-patch').diff({ messages: [1,2,3] }, { messages: [2,3,4] }); []
However it seems to be working if named for example as a:
a
> require('json-diff-patch').diff({ a: [] }, { a: [ { subject: 'Hello', body: 'This is a test message.' } ] }); [ { op: 'add', path: '/a/0', value: { subject: 'Hello', body: 'This is a test message.' } } ]
This sounds like the same issue as issue #2, just different property.
Looks like arrays are ignored if they are named as property
messages
:However it seems to be working if named for example as
a
: