I have a situation where I need to pass a large amount of data stored in an NSArray containing NSDictionary objects to a JavaScript function using a webview and the method:
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
My inquiries are:
- How can I properly format my arguments at the caller end so that JavaScript can interpret them?
- How do I retrieve these arguments in JavaScript? Specifically, what should the function signature look like and how can I access the key-value pairs of dictionary objects within the array in the JavaScript function?
I am not very experienced with JavaScript, so please forgive me if this question seems too vague. I hope it is clear enough!
Edit: I stumbled upon this thread which mentions that passing NSDictionary objects to JavaScript functions is not feasible. So, how can we accomplish this?
Thanks & Regards, Raj