hide id property in editor

I have recently started using CodeMirror 6. I have encountered a scenario where I need to render a JSON object, but I want to filter out the id property from being displayed in the editor. I would like to know if CodeMirror 6 has the capability to achieve this and if so, what feature should I use to accomplish this?

for example, the json is:

{
     text: 'hello',
     id: 'abc'
}


it should display in editor like this:

{
     text: 'hello',
}

You can do that, yes. You’ll want to maintain decorations created with Decoration.replace over the line that has the id.