Helpers for dealing with JavaScript data