JSFiddle - React, Tailwind, and code Playground
by irinablue
JavaScript
const str = "[\n {\n 'input': {\n get: 'attribute',\n where: [\n '[data-cart-count]'\n ],\n what: [\n 'data-cart-count'\n ]\n }\n },\n {\n input: {\n get: 'text',\n where: [\n '.header-cart__info .header-cart__name > span',\n '.header__cart-count-qty',\n '.cart-container__count',\n '.header__cart > span',\n '.header-middle__cart .count',\n '.header-cart__qty',\n '.header-cart__artikles .artikles',\n '#cart_block .cart > span',\n '#cart_block .count',\n '#cart_block .artikles',\n '#cart_block .count_info',\n '#cart_block .num',\n '.header-cart-artikel__artikles',\n '.header-cart__count'\n ]\n },\n processing: {\n validators: [\n {\n type: 'number'\n }\n ]\n }\n }\n]";
const json = JSON.parse(str);
const arr = Array.from(json);
console.log(arr)