Check back to a previous comment you may have missed, but I think vpc_security_group_hash and subnet_vpc_hash could be added as 'data' attributes on this select_f, which would make them accessible without needing to export as JSON in this :onchange attribute.