@acw im a js boy! not sure exactly what you're asking tho?
@loam like if you assign a Json thing, can you return something that only has the keys? possibly in the sameish layout as the original Json?
@acw hmm give me a clearer idea of what you intend to do with that returned object, and I can give u some sample code
@loam check if two Json objects match in structure and types
@acw are you validating one JSON object against a known JSON-formatted schema? or are these going to be totally arbitrary JSON objects which need to be compared somehow?
the latter will probably be a bit harder but both should be doable.
@loam latter. I'm seeing how other langs deal with it. if it's not a built in , don't bother.
@acw not that I'm aware of, unfortunately. you could get basic functionality with a one-liner like:
Object.keys(obj).map(key => ({key:key, type: typeof obj[key]}))
but it doesn't account for nested arrays or objects. anyway no that functionality isn't built in, to my knowledge. sorry!