How to get the look up(containing multiple columns) column values into a variable using REST API and Jquery...
up vote
-1
down vote
favorite
/* in the same way I need to get values from look up column which consisting of multiple columns from another list into a variable */
url : _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Cities')/items?$select=Country/Title&$expand=Country/Title",
sharepoint sharepoint-2013 sharepoint-online sharepoint-designer sharepoint-jsom
add a comment |
up vote
-1
down vote
favorite
/* in the same way I need to get values from look up column which consisting of multiple columns from another list into a variable */
url : _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Cities')/items?$select=Country/Title&$expand=Country/Title",
sharepoint sharepoint-2013 sharepoint-online sharepoint-designer sharepoint-jsom
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
/* in the same way I need to get values from look up column which consisting of multiple columns from another list into a variable */
url : _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Cities')/items?$select=Country/Title&$expand=Country/Title",
sharepoint sharepoint-2013 sharepoint-online sharepoint-designer sharepoint-jsom
/* in the same way I need to get values from look up column which consisting of multiple columns from another list into a variable */
url : _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Cities')/items?$select=Country/Title&$expand=Country/Title",
sharepoint sharepoint-2013 sharepoint-online sharepoint-designer sharepoint-jsom
sharepoint sharepoint-2013 sharepoint-online sharepoint-designer sharepoint-jsom
asked Nov 8 at 19:25
OMNI
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Hope you got the results in data.d.results.
var results=data.d.results;
displayObjectProperty("getData",results,"Title");
function displayObjectProperty(id,object,Property){
for(var x in object)
{
if(typeof(object[x]) == "object"){displayObjectProperty(id,object[x],Property)}else{
if(x==Property){
document.getElementById(id).innerHTML += "<b>" + x + "</b>"+"::<i>" + object[x] + "</i>";
}
}
}
}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Hope you got the results in data.d.results.
var results=data.d.results;
displayObjectProperty("getData",results,"Title");
function displayObjectProperty(id,object,Property){
for(var x in object)
{
if(typeof(object[x]) == "object"){displayObjectProperty(id,object[x],Property)}else{
if(x==Property){
document.getElementById(id).innerHTML += "<b>" + x + "</b>"+"::<i>" + object[x] + "</i>";
}
}
}
}
add a comment |
up vote
0
down vote
Hope you got the results in data.d.results.
var results=data.d.results;
displayObjectProperty("getData",results,"Title");
function displayObjectProperty(id,object,Property){
for(var x in object)
{
if(typeof(object[x]) == "object"){displayObjectProperty(id,object[x],Property)}else{
if(x==Property){
document.getElementById(id).innerHTML += "<b>" + x + "</b>"+"::<i>" + object[x] + "</i>";
}
}
}
}
add a comment |
up vote
0
down vote
up vote
0
down vote
Hope you got the results in data.d.results.
var results=data.d.results;
displayObjectProperty("getData",results,"Title");
function displayObjectProperty(id,object,Property){
for(var x in object)
{
if(typeof(object[x]) == "object"){displayObjectProperty(id,object[x],Property)}else{
if(x==Property){
document.getElementById(id).innerHTML += "<b>" + x + "</b>"+"::<i>" + object[x] + "</i>";
}
}
}
}
Hope you got the results in data.d.results.
var results=data.d.results;
displayObjectProperty("getData",results,"Title");
function displayObjectProperty(id,object,Property){
for(var x in object)
{
if(typeof(object[x]) == "object"){displayObjectProperty(id,object[x],Property)}else{
if(x==Property){
document.getElementById(id).innerHTML += "<b>" + x + "</b>"+"::<i>" + object[x] + "</i>";
}
}
}
}
answered Nov 10 at 16:41
Thangu
12
12
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53214796%2fhow-to-get-the-look-upcontaining-multiple-columns-column-values-into-a-variabl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown