flitbit / json-ptr

A complete implementation of JSON Pointer (RFC 6901) for nodejs and modern browsers.
MIT License
91 stars 28 forks source link

Creation of arrays with set (force: true) #10

Closed danfo closed 6 years ago

danfo commented 7 years ago

This allows the creation of arrays with set (force: true).

This should probably be a semver major bump, in case anyone is relying on the past behaviour:

ptr.set(data, '#/names/0', 'Dan', true);

Used to result in: { names: { 0: 'Dan' } }

It now results in: { names: ['Dan'] }