Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So I have this problem where I want to display the json result in input tag. I tried this Answer but the result is incorrect.

This is the json data:

["FAAS FRONT & BACK","NOA & TAX BILL"]

And this is the result:

Result

As you can see each character is in input box. How can I solve this?

The result should be like this:

This should be the result

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

On the JS, try use

data = JSON.parse(data);

So you can use it as an object instead.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...