#!/bin/python

import json

print "hi"
data = {"Outputs":{},"Resources":{},"Parameters":{},"Mappings":{}}
data['Resources'].update({'R1':{"Type":"Ec2","Prop":{"AMI":"ami_id"}}})
data['Resources'].update({'R2':{"Type":"Ec2","Prop":{"AMI":"ami_id"}}})

#print data['Resources']
#print type(data)
#print type(json.dumps(data))

d ={"Resources": [{
	"ec2": [
		["1", "t2.micro"],
	]
},
{"elb":[["1","public"],["2","private"]]}]}
print type(d)
json_obj = json.dumps(d)
print type(json_obj)
for i in d["Resources"]:
  if "elb" in i:
    print "elb"
    for k,v in i.iteritems():
      for j in v:
        print j 

