Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
There are few inputs
<input id=1> <input id=12> <input id=14> <input id=16> <input id=28>
How to implode ids to a string '1,12,14,16,28'?
You can use .map() convert the input objects to an array of ids then use Array.join() to convert them to a string
var ids = $('input').map(function(){ return this.id }).get().join()
Demo: Fiddle
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.