To answer your questions directly:
1) Is jsonString malformed?
It may actually be legal JSON (I'm not totally sure), but it will not be practical when used in any sort of javascript context or when parsed with any javascript JSON parser like jquery.parseJSON because of the duplicate keys.
2) Is there another jquery method I can use to include objects
with duplicate keys, i.e.
jquery.someAwesomeMethod(jsonString) => {"J":4,"0":"M", "J":5,"0":"N"}
No, there is no such jQuery method both because jQuery doesn't have that and because the output you desire is not possible in javascript. You've represented a Javascript object syntax, but Javascript objects don't support duplicate keys. In Javascript, the last value set for a given key wins.
So, if you intend to parse the JSON into a normal javascript object (how JSON is normally used in a browser app and how it is parsed with jquery.parseJSON()), you will not get duplicate keys with that type of data declaration as later declarations of the same key will likely just replace earlier declarations - only one will survive.
You probably want some different type of data structure such as an array or an object with array values for the keys:
Here's an array that just alternates between keys and values in pairs:
[
"J", 4,
"0","M",
"J", 5,
"0","N"
]
obj[0] // key
obj[1] // corresponding value
When accessing the array, the even indexes would be keys, the odd indexes would be values.
Or here's an object where the values are arrays so you can have more than one value per key:
{"J":[4, 5], "0":["M", "N"]}
typeof obj["J"] // Array
obj["J"].length // array of length == 2
obj["J"][0] // first value in array == 4
obj["J"][1] // second value in array == 5
Each key would hold an array of values.
obj.Jwhat would you expect it to evaluate to?jsonStringis a JavaScript object, not a JSON string. There is not reason to calljquery.parseJSON(jsonString). And as already said by others, object property names are unique in JS.