I have a requirement to fetch the details of selected element which is a child node of other element in a tree type json result. I will send the method which picks the tree root element and returns its data:
// to return main node elements
public ActionResult GetObjectCarriers(string GUID)
{
token = GetToken();
AuthenticatedUser = Security.GetUserFromToken(token);
string GetRegisteredCarriers = Common.Http.Get(AuthenticatedUser.AdministrationServicesHost, "RegisteredCarriers?token=" + token);
RegistrationResponse RegisteredCarrierResponse = JsonConvert.DeserializeObject<RegistrationResponse>(GetRegisteredCarriers);
RegisteredCarrierResponse.RegisteredCarriers.RemoveAll(x => !x.GuID.Contains(GUID));
return ViewComponent(typeof(CarrierViewComponent), new { identityListResponse = RegisteredCarrierResponse.RegisteredCarriers });
}
Now, for the method in controller to return the child node selected element, I have tried:
commented are my other trials which failed as well. I am sending my json result as well for clarity. Please help me how to get the proper result on this:
Member
168 Points
497 Posts
Fetch sub elements in a b API response and return them
Dec 06, 2019 05:58 PM|acmedeepak|LINK
Hi,
I have a requirement to fetch the details of selected element which is a child node of other element in a tree type json result. I will send the method which picks the tree root element and returns its data:
Now, for the method in controller to return the child node selected element, I have tried:
commented are my other trials which failed as well. I am sending my json result as well for clarity. Please help me how to get the proper result on this:
I need to display results for Symbol: EXP and then return its content.
All-Star
58454 Points
15765 Posts
Re: Fetch sub elements in a b API response and return them
Dec 06, 2019 08:24 PM|bruce (sqlwork.com)|LINK
your explanation is not clear. show the json you wish to produce.