-2

I am getting an array in string format:

"["a", "b", "c"]"

However, I need this as an array like:

["a", "b", "c"]

How can I do this in rails?

0

1 Answer 1

2

Just do eval('["a", "b", "c"]')

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. It solved my problem.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.