Made a javascript function that can render a card from a json object