Ruby on Rails Tuesday, June 16, 2015


On 16 Jun 2015 17:26, "Simon Eric" <lists@ruby-forum.com> wrote:
>
> Please how can i loop this to have all values of _id, contact, sent,
> answer, repondant?
>
> {
>     "result" : [
>         {
>             "_id" : null,
>             "contact" : 45684,
>             "sent" : 0,
>             "answer" : 0,
>             "repondant" : 0
>         },
>         {
>             "_id" : "vms",
>             "contact" : 6340,
>             "sent" : 6340,
>             "answer" : 0,
>             "repondant" : 0
>         },
>         {
>             "_id" : "sms",
>             "contact" : 27356,
>             "sent" : 41344,
>             "answer" : 0,
>             "repondant" : 0
>         }
>     ],
>     "ok" : 1
> }
>
>
> Thank you very much

Which bit don't you know how to do? Access the result array, iterate the array, access the individual elements, or print the values?

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/effbb0e610963e6d58151176875dae4b%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsGXzi3yH%2B_KB_9AV-WP_3pz9X%2BABOVdQs8-Ok5RC0pog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment