Changing display of tables based on forms in rails
===

I have some JSON that I pull in and read into an object `@items`. A second object, say 'items_old', holds the items from yesterday. :

    [
     {
      {
        "id": "A",
        "description": "a_description_one"
        "value": some_alphanumeric_string
      }, 
      {
        "id": "B",
        "description": "b_description_one"
        "value": some_alphanumeric_string
      }, 
      {
        "id": "C",
        "description": "c_description_one"
        "value": some_alphanumeric_string
      }
     }, 
     {
      {
        "id": "A",
        "description": "a_description_3"
        "value": some_alphanumeric_string
      }, 
      {
        "id": "B",
        "description": "b_description_3"
        "value": some_alphanumeric_string
      }, 
      {
        "id": "C",
        "description": "c_description_3"
        "value": some_alphanumeric_string
      }
     }, 
     ...
    ] 

My goal is to output a tables, as follows, in HTML:

     ----------------------------------------------------
    |  C value  | C description  |  Count       | Change |
    |----------------------------------------------------|
    |some string|it's description|times appeared| change |
     ----------------------------------------------------

This table works as follows: somewhere in the index file, there's a drop down box with all the ids from the code above (ie. A, B, C). When an option is selected, a table is loaded that looks like the one above. It takes each value of the chosen id and puts it in a table. When a value occurs twice, it's concatenated into one item, and the count is increased. Counts are compared to the ones from the day before, and the difference is displayed.