title: How can i list Cassandra cql result? Do i have to parse JSON?
body: <p>How can i parse my json style result from Cassandra?
  I'm using the cassandra-cql gem for rails and i want to parse the query result to list all messages. My query looks like: </p>
  
  <pre><code>def self.get_messages uid
    @@db.execute("SELECT * FROM messages WHERE uid=?", uid)
  end
  </code></pre>
  
  <p>how can i list all messages? My current view is:</p>
  
  <pre><code>&lt;% json_dec = ActiveSupport::JSON.decode(u.row.to_json) %&gt;
  &lt;% json_dec.each do |f| %&gt;
    &lt;%= f[1] %&gt;&lt;br/&gt;
  &lt;%end%&gt;
  </code></pre>
  
  <p>and it returns:</p>
  
  <pre><code>1
  [{"name"=&gt;"uid", "value"=&gt;"1", "timestamp"=&gt;-1}, {"name"=&gt;"1326751801", "value"=&gt;"test content", "timestamp"=&gt;1326751801970000}, {"name"=&gt;"1326754147", "value"=&gt;"some content to test", "timestamp"=&gt;1326754147612000}]
  </code></pre>
  
  <p>Is there any better way for the query? how do others solve this problem? </p>