{"action":"created","issue":{"url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/1153","repository_url":"https://api.github.com/repos/JoshClose/CsvHelper","labels_url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/1153/labels{/name}","comments_url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/1153/comments","events_url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/1153/events","html_url":"https://github.com/JoshClose/CsvHelper/issues/1153","id":377700662,"node_id":"MDU6SXNzdWUzNzc3MDA2NjI=","number":1153,"title":"Mapping Random Header name to the Valid Header","user":{"login":"duskbeforedawn","id":44792041,"node_id":"MDQ6VXNlcjQ0NzkyMDQx","avatar_url":"https://avatars0.githubusercontent.com/u/44792041?v=4","gravatar_id":"","url":"https://api.github.com/users/duskbeforedawn","html_url":"https://github.com/duskbeforedawn","followers_url":"https://api.github.com/users/duskbeforedawn/followers","following_url":"https://api.github.com/users/duskbeforedawn/following{/other_user}","gists_url":"https://api.github.com/users/duskbeforedawn/gists{/gist_id}","starred_url":"https://api.github.com/users/duskbeforedawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duskbeforedawn/subscriptions","organizations_url":"https://api.github.com/users/duskbeforedawn/orgs","repos_url":"https://api.github.com/users/duskbeforedawn/repos","events_url":"https://api.github.com/users/duskbeforedawn/events{/privacy}","received_events_url":"https://api.github.com/users/duskbeforedawn/received_events","type":"User","site_admin":false},"labels":[{"id":81846939,"node_id":"MDU6TGFiZWw4MTg0NjkzOQ==","url":"https://api.github.com/repos/JoshClose/CsvHelper/labels/question","name":"question","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-06T05:43:27Z","updated_at":"2018-11-09T01:10:07Z","closed_at":null,"author_association":"NONE","body":"Can you help me solve my problem.\r\nSuppose I have a csv file that contains the following:\r\n\r\nPlace,Lat,Long\r\nPhilippines,14.97322,121.2837813\r\n\r\nHowever I want to staticly define valid column headers such as:\r\n\r\nCountry,Latitude,Longitude\r\n\r\nI would like to allow the user to map the headers in the csv to the static valid headers like so:\r\n\r\nCountry = Place\r\nLatitude = Lat\r\nLongitude = Long\r\n\r\nI have the following mapping:\r\n\r\npublic MyDataClassMap()\r\n    {\r\n        Map(x => x.Country).Name(\"Country\", \"Place\", \"Location\");\r\n        Map(x => x.Latitude).Name(\"Latitude\", \"Lat\", \"Lati\");\r\n        Map(x => x.Longitude).Name(\"Longitude\", \"Long\", \"Longi\");\r\n    }\r\n\r\nAnd this works for me but the problem is that I manually input what would be the possible header name of the csv file. Here it looks like \"Country\" and the rest of them are being mapped manually not dynamically. I don't know what the columns is going to be named so how would that work? If the columns were always named Country, Place, Location etc. etc. this would work but sometimes its CountryA sometimes its Place1 sometimes its LocationB it is really random.\r\n\r\nWhat is a possible solution to this?\r\n"},"comment":{"url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/comments/437214143","html_url":"https://github.com/JoshClose/CsvHelper/issues/1153#issuecomment-437214143","issue_url":"https://api.github.com/repos/JoshClose/CsvHelper/issues/1153","id":437214143,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzIxNDE0Mw==","user":{"login":"duskbeforedawn","id":44792041,"node_id":"MDQ6VXNlcjQ0NzkyMDQx","avatar_url":"https://avatars0.githubusercontent.com/u/44792041?v=4","gravatar_id":"","url":"https://api.github.com/users/duskbeforedawn","html_url":"https://github.com/duskbeforedawn","followers_url":"https://api.github.com/users/duskbeforedawn/followers","following_url":"https://api.github.com/users/duskbeforedawn/following{/other_user}","gists_url":"https://api.github.com/users/duskbeforedawn/gists{/gist_id}","starred_url":"https://api.github.com/users/duskbeforedawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duskbeforedawn/subscriptions","organizations_url":"https://api.github.com/users/duskbeforedawn/orgs","repos_url":"https://api.github.com/users/duskbeforedawn/repos","events_url":"https://api.github.com/users/duskbeforedawn/events{/privacy}","received_events_url":"https://api.github.com/users/duskbeforedawn/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T01:10:07Z","updated_at":"2018-11-09T01:10:07Z","author_association":"NONE","body":"Can you give me an example how to do that? Or referred me to some issues that related to my problem. I've been searching and asking about this problem for more than a week already but I couldn't find an answer that can help me solve my problem."}}
{"actor":{"display_login":"duskbeforedawn"}}