Here is the code in a function I’m trying to revise. This example works on a single item from an existing array named “stream”:
list = [
{
service: 'service1',
user: stream [0],
template: {
posted:HTML1 + stream[0] + HTML2
}
}
],
The code originally called for manual entry for the user value so I switched to an array since I use the same value(s) elsewhere with $.each for HTML stuff).
The stream array can vary in length so I want to avoid manually writing something like this below since I suspect it would need to match the count of stream items (could be anywhere from 1 to 50 or more):
list = [
{
service: 'service1',
user: stream [0],
template: {
posted:HTML1 + stream[0] + HTML2
}
},
{
service: 'service1',
user: stream [1],
template: {
posted:HTML1 + stream[1] + HTML2
}
}
],
Thanks for your help and guidance!
PS This is another attempt at this question and hope it is clearer this time. Still learning.
I believe, you want this: