Skip to main content
Hello ALl,

Within an aura component how do you parse/split a string?

I need to sperate a string value that has the full name into 

First Name and last Name  

Thank you,

P
2 个回答
  1. 2022年4月9日 13:41
    HI Phuc,

    You can use the split function in your lightning component as suggested in https://salesforce.stackexchange.com/questions/237499/why-i-use-split-function-have-error-in-lightning-component-like-this

    Make sure you add a toString method convert the field to String. 

    Also see https://salesforce.stackexchange.com/questions/195052/how-to-use-split-function-inside-an-expression-in-lightning-component

    Thanks
0/9000