Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="text" value="{"id":"1","price":"30.00","edit":0},
- {"id":"2","price":"8.00","edit":0}" id="json" />
- **code:**
- var json = $('#json').val().split(',');
- for (var i = 0; i < json.length; i++){
- alert(json);
- }
- //(seems its splitting every comma it finds).
- $.parseJSON("[" + $('#json').val() + "]");
- <input type="text" value='{"id":"1","price":"30.00","edit":0},
- {"id":"2","price":"8.00","edit":0}' id="json" />
- <input type="text" value='{"id":"1","price":"30.00","edit":0},{"id":"2","price":"8.00","edit":0}' id="json" />
- value='{"id":"1","price":"30.00","edit":0}, {"id":"2","price":"8.00","edit":0}'
Add Comment
Please, Sign In to add comment