3 ms·
You can implement a set as an object, though. One presumes (not having tried the tool) that it's not sensitive to order differences in object field initializer
by ajross 18y ago
You can implement a set as an object, though. One presumes (not having tried the tool) that it's not sensitive to order differences in object field initializers.
Basically, "set" isn't a native data structure in Javascript, so it doesn't exist in JSON either. You can use arrays for that purpose, but just as with code, you need to be a little careful. Probably you should consider storing all your "sets" in a normalized (e.g. sorted) form.