I\'m using the tag-it library for jquery to make a tagging system (a bit like the stackoverflow one).
After the user types his tags the library returns a javascript arra
You can use JSON.stringify()
(MDN docu) and JSON.parse()
(MDN docu) for converting a JavaScript object into a string representation to store it inside a database.
var arr = [ 1, 2, 3 ];
var serializedArr = JSON.stringify( arr );
// "[1, 2, 3]"
var unpackArr = JSON.parse( serializedArr );
// identical array to arr
If your backend is written in PHP, there are similar methods to work with JSON strings there: json_encode()
(PHP docu) and json_decode()
(PHP docu).
Most other languages offer similar functionalities for JSON strings.