Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. fetch(this.props.url, {
  2. method: 'POST',
  3. body: JSON.stringify({
  4. class: 'property',
  5. action: 'view',
  6. objectId: this.props.element.id,
  7. token: this.props.token,
  8. }),
  9. })
  10. .then(response => response.json())
  11. .then(json => {
  12. this.setState({
  13. property: json.property
  14. });
  15. console.log(json);
  16. })
  17.  
  18. {
  19. property: {
  20. units: {
  21. {
  22. id: 31,
  23. ...
  24. },
  25. {
  26. id: 33,
  27. ...
  28. }
  29. }
  30. }
  31. }
  32.  
  33. property: {
  34. units: {
  35. {
  36. id: 33,
  37. ...
  38. },
  39. {
  40. id: 33,
  41. ...
  42. }
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement