0

I've got an API call that's returning the following JSON:

{
    "account_id": "accountID",
    "processed_length": 41,
    "sentiment": "NEGATIVE",
    "sentiment_score": -0.800000011920929,
    "text": "This is the worst possible solution ever."
}

I'm trying to print sentiment_score as its current value but {{sentiment_score}} is printing as 0. {{sentiment_score|float}} printed as 0.0. How can I get the full value and that it's negative in Jinja? {{sentiment}} and {{text}} are printing their values just fine.

D Johnson
  • 11
  • 2

2 Answers2

0

I was able to get it to show the minus sign by using {{0 + sentiment_score}}.

I didn't have the problem of truncated numbers though.

0

I was able to get the value to print properly in QuickBase Pipelines by just using the output value from the Iterate over JSON step. enter image description here

Erich Wehrmann
  • 464
  • 2
  • 11
  • Looks like the value type you're printing for group_0 is text though. Were you able to get it to print as a number? When I used the processed length value it was able to print as a number, but the sentiment score couldn't. Ultimately, I change the schema sample to have the sentiment score's value type be text, and it worked similar to how you have it, but I couldn't get it to print as a number, only text. – D Johnson Apr 11 '22 at 12:04