Answer the question
In order to leave comments, you need to log in
How to parse an associative array using only JS?
I am redesigning a website from php on a node and faced with the complexity of the old database architecture.
I have a simple site - template engine - ejs.
There are materials on the site (several thousand), each material has tags that are in this structure:
the code in the template : <%- JSON.stringify(item.tags) %>
returns such a bug: "tags":"a:2:{i:0;s:4:\"тег1\";i:1;s:5:\" тег2\";}"
Here is the question - how to parse this object using JS?
in principle, there is a way to solve it - through regular expressions - rub, clean, etc., but maybe there is something else?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question