I am using select2 plugin and mongodb for my project. Chrome does work well; however, firefox doesn't, when I am trying to construct an option with value (id) as ObjectsId (string), it fails with an error.
JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 10 of the JSON data
When instead of ObjectId I use number (integer), Firefox does work well.
Server response for a plugin - http://jsfiddle.net/p41jydsd/
<input autocomplete_
url="/tag/autocomplete/"
class="form-control select2-widget"
id="_tags"
inline_create="true"
multi="true"
name="tags"
type="hidden"
value="[{"text": " \u041c\u043e\u0441\u0433\u043e\u0440\u0438\u0437\u0431\u0438\u0440\u043a\u043e\u043c", "id": "544e67760faabf52c77c0dd2"}]" />
Thanks in advance.