question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use sortObjectKeys option

See original GitHub issue

When setting the option sortObjectKeys to true, an error is always thrown and the editor never loads.

ERROR TypeError: Cannot read property 'findNodeByInternalPath' of null
    at JSONEditor.push../node_modules/jsoneditor/src/js/treemode.js.treemode._onChange (treemode.js:475)
    at JSONEditor.push../node_modules/jsoneditor/src/js/treemode.js.treemode._onAction (treemode.js:453)
    at Node.push../node_modules/jsoneditor/src/js/Node.js.Node.sort (Node.js:3757)
    at Node.push../node_modules/jsoneditor/src/js/Node.js.Node.setValue (Node.js:491)
    at new Node (Node.js:37)
    at JSONEditor.push../node_modules/jsoneditor/src/js/treemode.js.treemode.set (treemode.js:180)
    at JSONEditor.push../node_modules/jsoneditor/src/js/JSONEditor.js.JSONEditor.setMode (JSONEditor.js:290)
    at JSONEditor.push../node_modules/jsoneditor/src/js/JSONEditor.js.JSONEditor._create (JSONEditor.js:199)
    at new JSONEditor (JSONEditor.js:149)
    at JsonEditorComponent.ngOnInit (ang-jsoneditor.js:68)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mariohmolcommented, Oct 23, 2019

Running on local demo of this project works… but indeed for stackblitz i have the same issue https://stackblitz.com/edit/ang-jsoneditor

this is now fixed on 1.8.4

thanks for that!

1reaction
mariohmolcommented, Sep 4, 2019

hi… there is a nw version with newest jsoneditor as well… please retest and if this still an issue… please reopen

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to sort/order keys in JavaScript objects?
One thing you could do is use Object.keys() , and sort the Array, then iterate it. Object.keys(data) .sort() ...
Read more >
Add option to sort object keys · Issue #64 · ljharb/qs - GitHub
Consider adding an option to sort object keys. This could be useful when using query strings for (or as part of) a unique...
Read more >
Array.prototype.sort() - JavaScript - MDN Web Docs
The sort() method sorts the elements of an array in place and returns the reference to the same array, now sorted. The default...
Read more >
How to Sort an Object by Key or Property Name in JavaScript
The first step in sorting a JavaScript object by its keys is to turn it into a Map . To do so, we...
Read more >
sort-object-keys2 - npm
Sort an object's keys, including an optional key list. Latest version: 2.0.3, last published: 2 years ago. Start using sort-object-keys2 in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found