Why do I get “no implicit conversion of String into Integer (TypeError)”?
From the exception, it seems that json in the second response is an array with only one element, so the output of puts json is the same (brackets don’t get output with puts), but json[“string”] fails because [] expects an Integer to use as index. Check p json or that json.is_a?(Array) and if it is … Read more