{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/2038","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/2038/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/2038/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/2038/events","html_url":"https://github.com/mesosphere/marathon/issues/2038","id":101831303,"number":2038,"title":"Make row mappings in app modal more generic","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mesosphere/marathon/labels/cleanup","name":"cleanup","color":"bfe5bf"},{"url":"https://api.github.com/repos/mesosphere/marathon/labels/good%20first%20bug","name":"good first bug","color":"bfe5bf"},{"url":"https://api.github.com/repos/mesosphere/marathon/labels/gui","name":"gui","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mesosphere/marathon/milestones/12","html_url":"https://github.com/mesosphere/marathon/milestones/Backlog","labels_url":"https://api.github.com/repos/mesosphere/marathon/milestones/12/labels","id":870039,"number":12,"title":"Backlog","description":"","creator":{"login":"ConnorDoyle","id":379372,"avatar_url":"https://avatars.githubusercontent.com/u/379372?v=3","gravatar_id":"","url":"https://api.github.com/users/ConnorDoyle","html_url":"https://github.com/ConnorDoyle","followers_url":"https://api.github.com/users/ConnorDoyle/followers","following_url":"https://api.github.com/users/ConnorDoyle/following{/other_user}","gists_url":"https://api.github.com/users/ConnorDoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/ConnorDoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConnorDoyle/subscriptions","organizations_url":"https://api.github.com/users/ConnorDoyle/orgs","repos_url":"https://api.github.com/users/ConnorDoyle/repos","events_url":"https://api.github.com/users/ConnorDoyle/events{/privacy}","received_events_url":"https://api.github.com/users/ConnorDoyle/received_events","type":"User","site_admin":false},"open_issues":172,"closed_issues":19,"state":"open","created_at":"2014-11-17T19:11:38Z","updated_at":"2015-08-19T08:09:25Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-08-19T08:09:25Z","updated_at":"2015-08-19T08:14:04Z","closed_at":null,"body":"As seen here the row mappings are not that generic and can be created in a more dynamic way:\r\nhttps://github.com/mesosphere/marathon-ui/pull/130#discussion-diff-37332571R75\r\n\r\nAlso the initialization of the rows could be more dynamic as discussed here:\r\nhttps://github.com/mesosphere/marathon-ui/pull/130#discussion-diff-37275318R19\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/132486286","html_url":"https://github.com/mesosphere/marathon/issues/2038#issuecomment-132486286","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/2038","id":132486286,"user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T08:14:04Z","updated_at":"2015-08-19T08:14:04Z","body":"We can consider the usage of objectPath too to resolve more nested object structures like this:\r\n```javascript\r\nvar portMappingsCount = objectPath(container, \"docker.portMappings\");\r\nportMappingsCount = portMappingsCount ? portMappingsCount.length || 1;\r\n```\r\nIt can be that `docker` is `null`. objectPath handles this."}}