Can use json data array? #212
-
Using an array of data from a json file by format
is it possible to use your script so that the result is displayed
tried multiple options result all the time
|
Beta Was this translation helpful? Give feedback.
Answered by
TarekRaafat
May 4, 2021
Replies: 1 comment 3 replies
-
Hello @Pavel222k, That's possible through using onSelection: (dataFeedback) => {
// Prepare the link URL
const url = dataFeedback.selection.value.urlink;
// Navigate to the selected item URL
window.location.href = url;
}; Try it and let me know how it goes. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Pavel222k
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @Pavel222k,
That's possible through using
.parentNode.insertBefore()
to insert thespan
inside thehref
but I would suggest using theonSelection
API method instead as shown below:Try it and let me know how it goes.