So I have a string[] variable and I want to only get the value of a specific key.
For example my string[] contains
{'firstname': 'john', 'lastname':'doe'}
In my view, I only want to display the last name. How do I do it?
{{myString.lastname}}
gives me blank.
{{myString}}
shows me
{'firstname': 'john', 'lastname':'doe'}
string[]is likely why you have this problem. Try declaring it asmyString: any = {}.