working json ids rb soln