When adding data into field, especially complex types, a lot of time one wants to remove a specific entry, and reset the resulting JSON string. As example, here is a Photo object with some data added:
In this example I want to remove the “promoted_at” value. Currently my JSON looks like this:
{“id”:“143532525253”, “created_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “updated_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “promoted_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “width”:“500”, “height”:“600”, “color”:“white”, “description”:“Image with white background”, “urls”:{“raw”:“http://www.images.com/image_raw.jpg”, “full”:“http://www.images.com/image_full.jpg”, “regular”:“http://www.images.com/image_regular.jpg”, “small”:“http://www.images.com/image_small.jpg”, “thumb”:“http://www.images.com/image_tn.jpg”}, “categories”:[“White”,“Blank”,“Empty”]}
However, if I simply delete the value inside of the entry box, my JSON becomes this:
{“id”:“143532525253”, “created_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “updated_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “promoted_at”:“”, “width”:“500”, “height”:“600”, “color”:“white”, “description”:“Image with white background”, “urls”:{“raw”:“http://www.images.com/image_raw.jpg",“full”:“http://www.images.com/image_full.jpg”,“regular”:“http://www.images.com/image_regular.jpg”,“small”:“http://www.images.com/image_small.jpg”,“thumb”:"http://www.images.com/image_tn.jpg”}, “categories”:[“White”,“Blank”,“Empty”]}
Which is not valid as “” is not a valid date and using this JSON would fail. Normally I would go into the JSON text and remove the whole item, but I have recently been told there is a hidden, undocumented key-shortcut to reset the entry:
- Click into the Entry
- Press Ctrl-0 (Control Zero)
This will “reset” the field:
And the JSON will now be clean:
{“id”:“143532525253”, “created_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “updated_at”:{“LinxExpression”:“$.System.CurrentDateTime”}, “width”:“500”, “height”:“600”, “color”:“white”, “description”:“Image with white background”, “urls”:{“raw”:“http://www.images.com/image_raw.jpg",“full”:“http://www.images.com/image_full.jpg”,“regular”:“http://www.images.com/image_regular.jpg”,“small”:“http://www.images.com/image_small.jpg”,“thumb”:"http://www.images.com/image_tn.jpg”}, “categories”:[“White”,“Blank”,“Empty”]}