Hi Mikayel,
JobRef is of struct type so you have to read field by field. Assuming you have basic job of name "xmpBJ:instance", try with the following code
//get the job properties
if (meta.DoesPropertyExist(kXMP_NS_XMP_BJ, "instance")) {
int arrSize = meta.CountArrayItems(kXMP_NS_XMP_BJ, "instance");
string jobid, jobname, joburl, stJB_struct_path;
for (int i = 1; i <= arrSize; ++i) {
string temppath = "instance";
temppath = temppath + "[" + std::to_string(i) + "]";
//read job id
SXMPUtils::ComposeStructFieldPath(kXMP_NS_XMP_BJ, temppath.c_str(), kXMP_NS_XMP_ST_Job, "id", &stJB_struct_path);
meta.GetProperty(kXMP_NS_XMP_BJ, stJB_struct_path.c_str(), &jobid, 0);
//reading jobname
SXMPUtils::ComposeStructFieldPath(kXMP_NS_XMP_BJ, temppath.c_str(), kXMP_NS_XMP_ST_Job, "name", &stJB_struct_path);
meta.GetProperty(kXMP_NS_XMP_BJ, stJB_struct_path.c_str(), &jobname, 0);
SXMPUtils::ComposeStructFieldPath(kXMP_NS_XMP_BJ, temppath.c_str(), kXMP_NS_XMP_ST_Job, "url", &stJB_struct_path);
meta.GetProperty(kXMP_NS_XMP_BJ, stJB_struct_path.c_str(), &joburl, 0);
cout << "job id is " << jobid <<"\t job name " <<jobname <<"\t joburl is " <<joburl <<endl;
}
}
Please let me know if I am missing anything.
-Sunil