You need to sign in to do that
Don't have an account?
Raju Krishnamoorthy 17
Showing JSON response in LWC
Hello LWC gurus: please help.
I'm calling out a REST service that returns a JSON response that contains a Parent-Child relationship. For example, response contains 10 Sales Orders, each Sales Order can upto 100+ Order lines. I want to show the Orders in LWC as HTML table, and when the user clicks on one particular Order (row action?!), all the Order Lines of that Order should be displayed. What is the best approach from LWC perspective? If you can point to some example code that would be of great help. Thank you.
I'm calling out a REST service that returns a JSON response that contains a Parent-Child relationship. For example, response contains 10 Sales Orders, each Sales Order can upto 100+ Order lines. I want to show the Orders in LWC as HTML table, and when the user clicks on one particular Order (row action?!), all the Order Lines of that Order should be displayed. What is the best approach from LWC perspective? If you can point to some example code that would be of great help. Thank you.
Review below examples which can help you with your implementation.
https://www.salesforcecodecrack.com/2019/08/make-rest-api-callout-in-lwc.html
https://www.sfdcstop.com/2019/01/salesforce-lightning-tutorial-part-6.html
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar