nodes: 0, module; 1, function_definition; 2, function_name:sort_by; 3, parameters; 4, block; 5, identifier:self; 6, identifier:property; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, return_statement; 12, identifier:order; 13, string:"asc"; 14, comment:"""Getting the sorted result by the given property
  
          :@param property, order: "asc"
          :@type property, order: string
  
          :@return self
          """; 15, call; 16, call; 17, block; 18, identifier:self; 19, attribute; 20, argument_list; 21, identifier:isinstance; 22, argument_list; 23, if_statement; 24, identifier:self; 25, identifier:__prepare; 26, attribute; 27, identifier:list; 28, comparison_operator:order == "asc"; 29, block; 30, else_clause; 31, identifier:self; 32, identifier:_json_data; 33, identifier:order; 34, string:"asc"; 35, expression_statement; 36, block; 37, assignment; 38, expression_statement; 39, attribute; 40, call; 41, assignment; 42, identifier:self; 43, identifier:_json_data; 44, identifier:sorted; 45, argument_list; 46, attribute; 47, call; 48, attribute; 49, keyword_argument; 50, identifier:self; 51, identifier:_json_data; 52, identifier:sorted; 53, argument_list; 54, identifier:self; 55, identifier:_json_data; 56, identifier:key; 57, lambda; 58, attribute; 59, keyword_argument; 60, keyword_argument; 61, lambda_parameters; 62, call; 63, identifier:self; 64, identifier:_json_data; 65, identifier:key; 66, lambda; 67, identifier:reverse; 68, True; 69, identifier:x; 70, attribute; 71, argument_list; 72, lambda_parameters; 73, call; 74, identifier:x; 75, identifier:get; 76, identifier:property; 77, identifier:x; 78, attribute; 79, argument_list; 80, identifier:x; 81, identifier:get; 82, identifier:property
code: def sort_by(self, property, order="asc"):
          """Getting the sorted result by the given property
  
          :@param property, order: "asc"
          :@type property, order: string
  
          :@return self
          """
          self.__prepare()
          if isinstance(self._json_data, list):
              if order == "asc":
                  self._json_data = sorted(
                      self._json_data,
                      key=lambda x: x.get(property)
                  )
              else:
                  self._json_data = sorted(
                      self._json_data,
                      key=lambda x: x.get(property),
                      reverse=True
                  )
  
          return self