JavaScript

How to read array of values from browser DOM using jQuery, or in Node.js using Cheerio

(Tue Mar 12 2019 00:00:00 GMT+0200 (Eastern European Standard Time)) Typically with jQuery or Cheerio we read or write strings and numbers to/from the DOM, but what if we must use objects or arrays of data? The jQuery documentation mentions data-* attributes, but the documentation is not entirely clear how to use this for reading/writing objects or arrays to/from the DOM.