Is it possible to pass a JSON object as an argument in function A, then use the same JSON object as an input for function B called within function A? Do I need to extract and stringify it before passing it to function B?
Thank you
For instance, consider this JSON object:
var client=[{"clientID":"1234",
"businessName":"ABC Corporation",
"legalName":"DCF Inc.",
"clientName":"John"}];
I want to pass this Client JSON object into function A like this:
function saveClient(clients){
// Inside this function, I aim to directly pass this entire Client object
// to function B
function showClient(clients){
// In this internal function, I plan to parse the Client object to access
// its properties
var clientID=client.clientID;
var businessName=client.businessName;
.....
.....
}
}