How to display key and value in a text field?

how to display key and value in a text field?

Example Json
{
model: “IN123”

size: “small”
}

i want to display the text as below

model : model: “IN123”
size: “small”

JSON.stringify() should do the trick

Not entirely, because this will include the brackets { } but that could be further cleaned up.

This includes curly braces and also the double quotes is their any other way where we can display a form
dynamically ?

let your_object = {
    "model": "IN123",
    "size": "small" 
}

// You can put this into the binding formula
Object.entries(your_object).map(([k,v]) => `${k}: "${v}"`);

This gives you an array like this:
Screenshot 2024-06-27 at 15.00.27

Which then you can bind to a div and bind the values of the array to a text element.