Hi, are there any way for me to manually map data to my model ? for example my body got this
{
"_index": "search-search-ntlm",
"_id": "ae7be893-6ced-4b0c-9230-b6bc168dcddd",
"_score": 1,
"_source": {
"creation_time": "2023-12-26T13:55:14Z",
"file_name": "",
"editor_id": 1073741823,
"type": "list_item",
"title": "All Draft Documents",
"url": "https://hostname/sites/test/Reports%20List/DispForm.aspx?ID=5&Source=https://hostname/sites/COPS/Reports%20List/AllItems.aspx&ContentTypeId=0x01009EC04F25E7BD464D9978DF8AB3448A9D",
"size": 0,
"id": "ae7be893-6ced-4b0c-9230-b6bc168dcddd",
"author_id": 1073741823,
"_timestamp": "2023-12-26T13:55:14Z",
"_allow_access_control": [
"login_name:SHAREPOINT\\system",
"email:test02@test.com",
"login_name:domain\\testuser01",
"login_name:domain\\testuser02",
"user_id:1",
"login_name:domain\\test01",
"email:sample1@test.com",
"user_id:22",
"user_id:1073741823",
"email:officer01@test.com",
"email:sample2@test.com",
"login_name:domain\\spsaccount",
"login_name:domain\\test02",
"user_id:20",
"user_id:21",
"user_id:17"
]
}
}
and i would like to map the _allow_access_control
seperately to my model attribute str email
, str login_name
, int user_id
seperately
example model class:
namespace Model
{
public class ElasticsearchDocs
{
public string Id { get; set; }
public string Title { get; set; }
public string Url { get; set; }
public string Body { get; set; }
public string Email { get; set; }
public string LoginName { get; set; }
public int UserID { get; set; }
}
}
Thanks for the assistance