## I2CE Class Hash

This shows how to access add key/value pairs saved into a class attribute.

- key:val means that we should do a json_decode on the value.
- key=val means that key has the value val. If val is true or false, it is interpreted as a boolean. If val is of the form [0-9]* it is converted to an int. if val is of the form [0-9]+\.[0-9]* it is converted to a float. If it is of the form \[.*(,*)\] it is converted to an array, exploded on ',', where each part is subject to the same parsing rules. Otherwise it is a string.
- Only the property names in the object passed to showEachVal() or showAllVals() are scanned in the class attribute.
- Any value can be single quoted so that you can, for example, include white space in a value. The back-slash and single quote character are escaped with a back-slash.

## Tests

- Equals Each Test
  Should show a with value A, b with value 2, c= true, d = false, e=0.3, f the array [1,2,gogo]

      class='a=A b=2 c=true d=false e=0.3 f=[1,2,gogo]

- Equals All Test
  Should show a with value A, b with value B.
  Note: although c and d are set, they will not show b/c they are not in the options passed to showAllVals()

      class='a=A b=B c=true d=false'

- Equals Quoted Each Test
  Should show a with value A A, b with value B B

      class="a='A A' b='B B'"

- Equals Quoted All Test
  Should show a with value A A, b with value B B

      class="a='A A' b='B B'"

- JSON Each Test
  Should show a with value {a1:'A1',a2:2}, b with value {b1:'B1',b2:2}

      class='a:{a1:"A1",a2:2} b:{b1:"B1",b2:2}'

- JSON All Test
  Should show a with value {a1:'A1',a2:2}, b with value {b1:'B1',b2:2}

      class='a:{a1:"A1",a2:2} b:{b1:"B1",b2:2}'

- JSON Quoted Each Test
  Should show a with value {a1:'A1',a2:2}, b with value {b1:'B1',b2:2}

      class="a:'{a1: \'A1\' ,a2:2}' b:'{b1:\'B1\', b2:2} '"

- JSON Quoted All Test
  Should show a with value {a1:'A1',a2:2}, b with value {b1:'B1',b2:2}

      class="a:'{a1: \'A1\' ,a2:2}' b:'{b1:\'B1\', b2:2} '"