I am working with JSContext and the rest of JavaScriptCore. Can anybody explain to me why evaluateScript fails in the second assertion?
let context = JSContext()!
let obj1 = context.evaluateScript("[{ 'first': 'Grace', 'last': 'Hopper', 'year': 1906 }]")
assert(obj1?.isArray ?? false)
let obj2 = context.evaluateScript(" { 'first': 'Grace', 'last': 'Hopper', 'year': 1906 } ")
assert(obj2?.isObject ?? false)
Why does wrapping an object in an array works, but the raw objects does not work?