mardi 21 février 2023

How to convert an object into array of values from object in ruby

If object is- Object Data=Object.to_json() Data looks something like these Data=[{"id":1},{"id":2},{"id":3}]

And I want to transform into an array looks something like that Data=[1,2,3]

Aucun commentaire:

Enregistrer un commentaire