Easy Code Share > Javascript > JSON

How to Store JSON Array in HTML Attribute and Get it

How to Store JSON Array in HTML Attribute and Get it

You can store JSON object or JSON array into an attribute on an HTML element, just as you treat them as strings. This article teach you how to embed JSON data in HTML, and moreover, retrieve it from HTML attributes. Along with this major topic, an extra tip about toggling to hide or show some … Read more