def _GetResidentPagesJSON(pages_list):
  """Transforms the pages list to JSON object.

  Args:
    pages_list: (list) As returned by ParseResidentPages()

  Returns:
    (JSON object) Pages JSON object.
  """
  json_data = []
  for i in range(len(pages_list)):
    json_data.append({'page_num': i, 'resident': pages_list[i]})
  return json_data