Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to remove already present double quotes from strings in Objects in Angular?

Using Angular, Data is being recieved in Object form, from the Database to the Backend to the Frontend. In HTML:

<h3>Payslip for the month of {{dataout[0].MonthYear | json }}</h3>

Where Dataout is the Object recieved which is having multiple entries. The Problem is that when I run the Project, then on website it shows the result like:

Payslip for the month of "February, 2022"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Instead it should show it like:

Payslip for the month of February, 2022

All strings are being shown in double quotes like above.

Any help would be appreciated. Thanks in advance (I am a newbie).

>Solution :

That’s because you are using the json pipe.

Just remove the | json at then end of your interpolation.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading