You need to sign in to do that
Don't have an account?
Inbox Outbox
LWC javascript: array vs object
Sometime you use an array and sometimes an object, how do we know that? How do we know what to use? I am presuming that when we have key value pairs we use object and other times we use array. But there is more to this than what I know.
Please advise.
Please advise.
>> https://blog.salesforcecasts.com/send-arrays-from-lwc-to-apex-methods/
>> https://www.salesforcepoint.com/2020/07/Lwc-Iteration-Array-List-Items.html
>> https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.data_wire_service_about
The above links have details that can help you, can you try checking once.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
All Answers
Hi
Kindly refer this below article to understand their use in detail :-
https://www.sfdcblogs.com/post/useful-javascript-s-methods-in-lwc-and-lightning-component-part-i
If the above information helps, please mark it as best answer.
Regards,
Priya Ranjan
>> https://blog.salesforcecasts.com/send-arrays-from-lwc-to-apex-methods/
>> https://www.salesforcepoint.com/2020/07/Lwc-Iteration-Array-List-Items.html
>> https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.data_wire_service_about
The above links have details that can help you, can you try checking once.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
Thank you for the links.
What I understand is that when we have a list we use an array and we have key value pairs we use an object? Am I right?